module.exports = (jsArray, cssArray) => {  return  `;((jsArray, cssArray) => {
    function loadJs(url, callback) {
      var script = document.createElement('script')
      script.type = 'text/javascript'
      if (typeof (callback) !== 'undefined') {
        if (script.readyState) {
          script.onreadystatechange = function() {
            if (script.readyState === 'loaded' || script.readyState === 'complete') {
              script.onreadystatechange = null
              callback()
            }
          }
        } else {
          script.onload = function() {
            callback()
          }
        }
      }
      script.src = url
      document.body.appendChild(script)
    }
  
    function loadCss(url, callback) {
      var css = document.createElement('link')
      if (typeof (callback) !== 'undefined') {
        if (css.readyState) {
          css.onreadystatechange = function() {
            if (css.readyState === 'loaded' || css.readyState === 'complete') {
              css.onreadystatechange = null
              callback()
            }
          }
        } else {
          css.onload = function() {
            callback()
          }
        }
      }
      css.href = url
      css.rel = 'stylesheet'
      document.head.appendChild(css)
    }
    jsArray.forEach(url => {
      loadJs(url)
    })
    cssArray.forEach(url => {
      loadCss(url)
    })
  })(${jsArray}, ${cssArray})`
}

